<include file="Public:pagerForm" />

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__URL__" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>区块名：</label>
				<input name="commodity_id" value="{$_REQUEST.commodity_id}" />
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="__URL__/add" target="dialog" mask="true" width="800" height="480"><span>新增</span></a></li>
			<li><a class="edit" href="__URL__/edit/id/{id}" target="dialog" width="800" height="480" mask="true" warn="请选择数据"><span>编辑</span></a></li>
			
			<li class="line">line</li>
		</ul>
	</div>

	<table class="table" width="100%" layoutH="138">
		<thead>
		<tr>
			<th width="60">编号</th>
			<th width="100" >商品名称</th>
			<th width="200" >搭配集合</th>
		</tr>
		</thead>
		<tbody>
		<volist id="vo" name="list">
			<tr target="id" rel="{$vo['id']}">
				<td>{$vo['id']}</td>
				<td>{$commodity_list[$vo['commodity_id']]['name']}({$vo['commodity_id']})</td>
				<?php
				$tmp_name = "";
				if(!empty($vo['collocations'])){
					$tmp_arr = explode(",",$vo['collocations']);
					foreach($tmp_arr as $tmp_id){
						if($tmp_name=="") $tmp_name = $commodity_list[$tmp_id]['name'];
						else $tmp_name.= ",".$commodity_list[$tmp_id]['name'];
					}
				}
				?>
				<td>{$tmp_name}({$vo['collocations']})</td>
			</tr>
		</volist>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>共{$totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>
	</div>

</div>


